<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
		var str = new String("abcd");
		
		console.log(str);
		for(var i = 0;i<str.length;i++){
			console.log(str.charAt(i));
		}
		console.log(str.charAt(0));
		console.log(str.charAt(1));
		console.log(str.charAt(2));
		console.log(str.charAt(3));
		
		//返回unicode中的码表值
		console.log(str.charCodeAt(0));
	</script>
</html>
